import request from '@/utils/request'

// 查询来钱乐设备列表
export function listEquipment(query) {
    return request({
        url: '/laiqianle/equipment/list',
        method: 'get',
        params: query
    })
}

// 查询来钱乐设备详细
export function getEquipment(id) {
    return request({
        url: '/laiqianle/equipment/' + id,
        method: 'get'
    })
}

// 新增来钱乐设备
export function addEquipment(data) {
    return request({
        url: '/laiqianle/equipment',
        method: 'post',
        data: data
    })
}

// 修改来钱乐设备
export function updateEquipment(data) {
    return request({
        url: '/laiqianle/equipment',
        method: 'put',
        data: data
    })
}

// 删除来钱乐设备
export function delEquipment(id) {
    return request({
        url: '/laiqianle/equipment/' + id,
        method: 'delete'
    })
}


// 生成外部设备
export function batchOutDevice(id) {
    return request({
        url: '/laiqianle/equipment/batchOutDevice/' + id,
        method: 'post'
    })
}


// 下载导入模板
export function importTemplateApi() {
    return request({
        url: '/laiqianle/equipment/importTemplate',
        method: 'get'
    })
}